import hashlib
def sha1_encrypt(data):
    bytes_data = data.encode('utf-8')
    sha1 = hashlib.sha1()
    sha1.update(bytes_data)
    return sha1.hexdigest()

# 测试示例
if __name__ == "__main__":
    text = "Ruijie@123"
    encrypted = sha1_encrypt(text)
